package com.sm.dao;

import java.util.List;

import com.sm.model.HomeRecord;
import org.apache.ibatis.annotations.Param;

public interface HomeRecordMapper {
    int deleteByPrimaryKey(Integer homeRecordId);

    int insert(HomeRecord record);

    int insertSelective(HomeRecord record);

    HomeRecord selectByPrimaryKey(Integer homeRecordId);

    int updateByPrimaryKeySelective(HomeRecord record);

    int updateByPrimaryKey(HomeRecord record);
    
    /**
     *	首页根据用户id查询用户的首页搜索历史记录
     * @param userId	用户id
     * @return
     */
    List<HomeRecord> selectHomeRecords(@Param("userId")Integer userId);
    
    /**
     *	根据用户id清除首页的所有搜索记录
     * @param userId	用户id
     * @return
     */
    int clearHomeSearch(@Param("userId")Integer userId);
    
    
    
}











